package cn.sc.summer.auth.token.store.base;

import cn.sc.summer.token.po.UserDetailX;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 接口：登录成功创建token
 *
 * @author a-xin
 * @date 2024/6/29 09:06
 */
public interface AuthenticationToken {

    /**
     * 创建token信息
     *
     * @param request        请求体
     * @param response       返回数据载体
     * @param authentication 验证信息
     * @param userDetailX    登录用户信息
     */
    void creatToken(HttpServletRequest request,
                    HttpServletResponse response,
                    Authentication authentication,
                    UserDetailX userDetailX) throws Throwable;

}
